package com.wxzhou.wangzhuan.dto.pay;

import java.io.Serializable;

/**
 * 汇服八方通用请求对象
 */
public class HuifuCommonRequestDto<T> implements Serializable {
    private String comKey;
    private Long timestamp;
    private T data;

    public HuifuCommonRequestDto() {
    }

    private HuifuCommonRequestDto(String comKey, T data) {
        this.comKey = comKey;
        this.timestamp = System.currentTimeMillis() / 1000;
        this.data = data;
    }

    public static <T> HuifuCommonRequestDto<HuifuWeixinSchemeReq> createRequestScheme(String comKey, HuifuWeixinSchemeReq data) {
        return new HuifuCommonRequestDto<HuifuWeixinSchemeReq>(comKey, data);
    }

    public String getComKey() {
        return comKey;
    }

    public void setComKey(String comKey) {
        this.comKey = comKey;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
